/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * StorageView.java
 *
 * Created on 07-06-2011, 12:59:02
 */
package views;

import common.Session;
import controllers.StorageController;
import controllers.StorageItemController;
import java.util.ArrayList;
import javax.swing.DefaultListModel;
import models.Storage;
import models.StorageItem;

/**
 *
 * @author Dan
 */
public class StorageView extends AbstractView {

    private StorageController stoCtr = new StorageController();
    private ArrayList<StorageItem> storageItemsList = new ArrayList<StorageItem>();
    private StorageItemController stoItemCtr = new StorageItemController();
    private StorageItem StorageItem  = null;

    public StorageView() {
        initComponents();
        lblclean();
    }

    public StorageView(Storage s) {
        initComponents();
        stoItemCtr.setTemporaryStorageChangeObjet(s);
        String name = s.getName();
        String description = s.getDescription();
        String amount = Integer.toString(s.getAmount());
        txtStorageName.setText(name);
        txtStorageDescription.setText(description);
        txtStorageAmount.setText(amount);
        storageItemsList = stoItemCtr.getStorageItems(s.getId());
        for (StorageItem si : this.storageItemsList) {
            System.out.println(si.getStorageName());
        }
        updateFields();
        lblclean();
    }

    public void lblclean() {
        lblError.setText("");
    }

    private void updateFields() {
        if (storageItemsList.size() > 0) {
            DefaultListModel itemlistModel = new DefaultListModel();
            for (StorageItem si : this.storageItemsList) {
                itemlistModel.addElement("#" + si.getSerialnumber() + "  " + "    Forsvund" + si.getLostAmount() + "     " + si.getAmount() + "stk.");
            }
            listStorageItems.removeAll();
            listStorageItems.setModel(itemlistModel);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtStorageName = new javax.swing.JTextField();
        txtStorageAmount = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtStorageDescription = new javax.swing.JTextArea();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        listStorageItems = new javax.swing.JList();
        btnNewStoreageItem = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        txtStorageItemSerienummer = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        lblRent = new javax.swing.JLabel();
        lblLostAmount = new javax.swing.JLabel();
        spinStorageItemAmount = new javax.swing.JSpinner();
        btnDelete = new javax.swing.JButton();
        btnUpdate = new javax.swing.JButton();
        btnSaveStorage = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        lblError324234 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        lblError = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Lager"));
        jPanel2.addContainerListener(new java.awt.event.ContainerAdapter() {
            public void componentRemoved(java.awt.event.ContainerEvent evt) {
                jPanel2ComponentRemoved(evt);
            }
        });

        jLabel1.setText("Navn:");

        jLabel2.setText("Antal:");

        jLabel9.setText("Beskrivelse:");

        txtStorageDescription.setColumns(20);
        txtStorageDescription.setRows(5);
        jScrollPane1.setViewportView(txtStorageDescription);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtStorageName, javax.swing.GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtStorageAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel9))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(txtStorageName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtStorageAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Varer"));

        listStorageItems.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                listStorageItemsValueChanged(evt);
            }
        });
        jScrollPane2.setViewportView(listStorageItems);

        btnNewStoreageItem.setText("Opret ny");
        btnNewStoreageItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNewStoreageItemActionPerformed(evt);
            }
        });

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Eksemplar oplysninger"));

        jLabel3.setText("Serienummer:");

        jLabel4.setText("Antal:");

        jLabel5.setText("Antal mistet:");

        jLabel6.setText("Udlånt til:");

        lblRent.setText("<Ingen>");

        lblLostAmount.setText("0");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(spinStorageItemAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtStorageItemSerienummer, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(4, 4, 4))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel6)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblRent)
                            .addComponent(lblLostAmount))))
                .addContainerGap(6, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(32, 32, 32)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(txtStorageItemSerienummer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(spinStorageItemAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(53, 53, 53)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(lblLostAmount))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(lblRent))
                .addContainerGap())
        );

        btnDelete.setText("Slet");
        btnDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDeleteActionPerformed(evt);
            }
        });

        btnUpdate.setText("Opdater");
        btnUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUpdateActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap(43, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(btnNewStoreageItem)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnDelete)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 341, Short.MAX_VALUE)
                        .addComponent(btnUpdate)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(16, 16, 16)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnNewStoreageItem)
                            .addComponent(btnDelete)
                            .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnSaveStorage.setText("Gem");
        btnSaveStorage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveStorageActionPerformed(evt);
            }
        });

        jLabel7.setText("Status:");

        lblError.setText("lblError");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addGap(51, 51, 51)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblError324234, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblError, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(18, 18, 18)
                        .addComponent(btnSaveStorage))
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(lblError)
                    .addComponent(btnSaveStorage))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblError324234)
                    .addComponent(jLabel8))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnNewStoreageItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewStoreageItemActionPerformed

        int serieId = storageItemsList.size() + 1;
        StorageItem si = new StorageItem(0, 0, 0, " nr:" + serieId);
        storageItemsList.add(si);

        updateFields();

}//GEN-LAST:event_btnNewStoreageItemActionPerformed
    private void btnSaveStorageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveStorageActionPerformed
        Storage s = stoItemCtr.getTemporaryStorageChangeObjet();
        if (s != null) {
            if (showConfirm("Er du sikker på du vil ændre " + s.getName())) {
                try {
                    s.setAmount(stringToInt(txtStorageAmount.getText()));
                    s.setDescription(txtStorageDescription.getText());
                    s.setName(txtStorageName.getText());
                    stoCtr.updateStorage(s);
                    stoItemCtr.updateStorage(storageItemsList);
                } catch (Exception e) {
                    lblError.setText("Der skete en fejl!");
                }
            }
        } else {

            int storageId = 0;
            int amount = 0;
            for (StorageItem si : storageItemsList) {
                amount = amount + si.getAmount();
            }
            if (txtStorageName.getText().length() > 0 && txtStorageAmount.getText().length() > 0 && txtStorageDescription.getText().length() > 0) {
                if (amount < stringToInt(txtStorageAmount.getText())) {
                    try {
                        String name = txtStorageName.getText();
                        String description = txtStorageDescription.getText();
                        String stringAmount = txtStorageAmount.getText();
                        int storageamount = Integer.valueOf(stringAmount);
                        storageId = stoCtr.addStorage(name, description, storageamount);
                        lblError.setText("Tingen blev oprettet!");
                    } catch (Exception e) {
                        lblError.setText("Tingen blev ikke oprettet!");
                    }
                    try {
                        if (storageId > 0) {
                            if (stoItemCtr.addStorageItem(storageItemsList, storageId) == 1) {
                                lblError.setText("Tingen blev oprettet!");
                            } else {
                                lblError.setText("Tingen blev oprettet uden nogen eksemplar!");
                            }
                        }
                    } catch (Exception e) {
                        lblError.setText("Tingen blev oprettet men der skete en fejl så der blev ikke oprettet nogen eksemplar!");
                    }
                } else {
                    lblError.setText("Der er flere eksemplar end der materialer på lager, slet nogle og prøv igen.");
                }
            } else {
                lblError.setText("Husk at udfylde alle felter!");
            }
}//GEN-LAST:event_btnSaveStorageActionPerformed

    }
    private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteActionPerformed
        if (listStorageItems.getSelectedIndex() > -1) {
            storageItemsList.remove(listStorageItems.getSelectedIndex());
            updateFields();
        }
    }//GEN-LAST:event_btnDeleteActionPerformed

    private void listStorageItemsValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_listStorageItemsValueChanged
        try {
            stoItemCtr.setTemporaryStorageItemChangeObjet(storageItemsList.get(listStorageItems.getSelectedIndex()));
            this.StorageItem = stoItemCtr.getTemporaryStorageItemChangeObjet();
            txtStorageItemSerienummer.setText(StorageItem.getSerialnumber());
            lblLostAmount.setText(String.valueOf(StorageItem.getLostAmount()));
            spinStorageItemAmount.setValue(StorageItem.getAmount());
        } catch (Exception e) {
        }
    }//GEN-LAST:event_listStorageItemsValueChanged

    private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateActionPerformed
        if (showConfirm("Er du sikker på du vil opdatere eksemplaret?")) {
            StorageItem.setSerialnumber(txtStorageItemSerienummer.getText());
            StorageItem.setAmount(stringToInt(spinStorageItemAmount.getValue().toString()));
            updateFields();
        }
    }//GEN-LAST:event_btnUpdateActionPerformed

    private void jPanel2ComponentRemoved(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_jPanel2ComponentRemoved
        // TODO add your handling code here:
    }//GEN-LAST:event_jPanel2ComponentRemoved

     /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new StorageView().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDelete;
    private javax.swing.JButton btnNewStoreageItem;
    private javax.swing.JButton btnSaveStorage;
    private javax.swing.JButton btnUpdate;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel lblError;
    private javax.swing.JLabel lblError324234;
    private javax.swing.JLabel lblLostAmount;
    private javax.swing.JLabel lblRent;
    private javax.swing.JList listStorageItems;
    private javax.swing.JSpinner spinStorageItemAmount;
    private javax.swing.JTextField txtStorageAmount;
    private javax.swing.JTextArea txtStorageDescription;
    private javax.swing.JTextField txtStorageItemSerienummer;
    private javax.swing.JTextField txtStorageName;
    // End of variables declaration//GEN-END:variables
}
